package com.lyl.common.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author Mr.Luo
 */

@Getter
@AllArgsConstructor
public enum BaseCode implements AbstractCode {
    //成功
    SUCCESS(200, "成功"),
    FAILURE(400, "失败"),

    //系统异常
    UNAUTHORIZED(401, "认证异常"),
    ACCESS_DENIED(403, "权限不足, 无法访问"),
    NOT_FOUND(404, "接口不存在"),
    METHOD_NOT_SUPPORT(405, "请求方式不支持"),
    POST_REQUEST_BODY_NOT_JSON(406, "post请求体不是json"),
    SYSTEM_ERROR(500, "系统异常"),


    // 业务异常
    BIZ_ERROR(10001, "业务异常"),
    ILLEGAL_PARAM(10002, "传入参数不合法"),
    ;

    private final int code;
    private final String msg;
}
